home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Games / dynAMIte / Developer / Assembler / dynamite.i
Encoding:
Text File  |  2001-07-22  |  6.7 KB  |  213 lines

  1.     IFND DYNAMITE_I
  2. DYNAMITE_I    SET    1
  3.  
  4. ;    Assembler includes for dynamite bot developers
  5. ;    Created by Ilkka Lehtoranta 3-Jun-2001
  6. ;               updated 10-jun-2001
  7.  
  8.     IFND EXEC_LISTS_I
  9.     INCLUDE "exec/lists.i"
  10.     ENDC    ; EXEC_LISTS_I
  11.  
  12.     IFND EXEC_SEMAPHORES_I
  13.     INCLUDE "exec/semaphores.i"
  14.     ENDC    ; EXEC_SEMAPHORES_I
  15.  
  16.  
  17. *    plr_Status        *
  18.  
  19. PA_NONE        EQU    0    ; no player
  20. PA_VISI        EQU    1    ; visitor
  21. PA_LOGGEDIN    EQU    2    ; just logged in/after a game
  22. PA_PLAYING    EQU    3    ; is in game (no matter if he's dead)
  23. PA_COUNTDOWN    EQU    4    ; this is of no use. players only have this status if they logged in.
  24. PA_DEAD        EQU    5    ; this is of no use, it's not meant to see if a player is actually dead.
  25.                 ; use player.dead instead. it's only set after successfull login for
  26.                 ; other players
  27. PA_WON        EQU    6    ; a player has this status if he won the last round
  28.  
  29.  
  30. *    ds_GameRunning        *
  31.  
  32. GAME_CLOSEGAME        EQU    0    ; transitional state to GAME_MENU after connection got closed
  33. GAME_MENU           EQU    1    ; game is in menu eg: login screen
  34. GAME_ENDGAME        EQU    2    ; transitional state to GAME_MENU after effect has been drawn
  35. GAME_EFFECT         EQU    3    ; game draws effect after a match
  36. GAME_COUNTDOWN        EQU    4    ; game is doing countdown
  37. GAME_GAME           EQU    5    ; game is running
  38. GAME_HURRYUP        EQU    6    ; game is running and is in hurry up mode
  39. GAME_NOTCONNECTED    EQU    7    ; game is not connected (startscreen)
  40.  
  41. DIR_NONE        EQU    -1
  42. DIR_DOWN        EQU    0
  43. DIR_RIGHT        EQU    1
  44. DIR_LEFT        EQU    2
  45. DIR_UP            EQU    3
  46.  
  47. SPEED_NORMAL        EQU    4
  48. SPEED_SLOW        EQU    3
  49. SPEED_FAST        EQU    6
  50.  
  51. BLOCK_FAKEBLOCK        EQU    -1    ; used for remote/kick bombs which are placed into the map
  52. BLOCK_NOBLOCK        EQU    0    ; empty field
  53. BLOCK_HARDBLOCK        EQU    1    ; non-destroyable block
  54. BLOCK_DESTROYABLE    EQU    2    ; normal block
  55. BLOCK_BOMB        EQU    3    ; normal bomb
  56. BLOCK_BORDERWALL1    EQU    4    ; borderblocks are equal to hardblock
  57. BLOCK_BORDERWALL2    EQU    5
  58. BLOCK_BORDERWALL3    EQU    6
  59. BLOCK_BORDERWALL4    EQU    7
  60. BLOCK_BORDERWALL5    EQU    8
  61. BLOCK_BORDERWALL6    EQU    10
  62. BLOCK_BORDERWALL7    EQU    11
  63. BLOCK_BORDERWALL8    EQU    12
  64. BLOCK_BORDERWALL9    EQU    13
  65. BLOCK_BORDERWALL10    EQU    14
  66. BLOCK_BORDERWALL11    EQU    15
  67. BLOCK_BORDERWALL12    EQU    16
  68. BLOCK_ADDBOMB        EQU    19    ; block which contains a bomb
  69.  
  70. BO_EXPANDFLAME        EQU    1    ; types for bonusgrid
  71. BO_ADDBOMB        EQU    2
  72. BO_FLAMEMAX        EQU    3
  73. BO_BOMBMAX        EQU    4
  74. BO_RANDOMWALL        EQU    5
  75. BO_BOMBS2BLOCKS        EQU    6
  76. BO_DROPALL        EQU    7
  77. BO_EXPLALL        EQU    8
  78. BO_FASTER        EQU    9
  79. BO_SLOWER        EQU    10
  80. BO_SHORTERFUSE        EQU    11    ; min fuse is 20 and max is 65
  81. BO_LONGERFUSE        EQU    12
  82. BO_SHORTERFLAME        EQU    13
  83. BO_SWAPCONTROLSLR    EQU    14
  84. BO_FEWERBOMBS        EQU    15
  85. BO_NODROP        EQU    16
  86. BO_SHIELD        EQU    17
  87. BO_STANDSTILL        EQU    18
  88. BO_TELEPORT        EQU    19
  89. BO_REMOTEBOMB        EQU    20
  90. BO_BACK2BASIC        EQU    21
  91. BO_KICKBOMB        EQU    22
  92. BO_SABER        EQU    23
  93. BO_SWAPCONTROLSUD    EQU    24
  94. BO_MAGNET        EQU    25
  95. BO_PHOENIX        EQU    26
  96. BO_DOHURRYUP        EQU    27
  97. BO_INVISIBLE        EQU    28
  98. BO_DUELL        EQU    29
  99. BO_AFTERBURNER        EQU    30
  100. BO_FLAG            EQU    31
  101. BO_TELEPORTALL        EQU    32
  102. BO_MAPJUMP        EQU    33
  103. BO_RESTARTMAP        EQU    34
  104. BO_SWAPPOSITIONS    EQU    35
  105. BO_MAX            EQU    36
  106.  
  107.  
  108. BOMB_NORMAL    EQU    0    ; normal bomb
  109. BOMB_GEN    EQU    1    ; predefined bomb (map)
  110. BOMB_REMOTE    EQU    2    ; remote bomb
  111. BOMB_KICK    EQU    3    ; kick bomb
  112.  
  113.  
  114.     STRUCTURE ServerData,0
  115.     STRUCT    sd_ServerName,34
  116.     STRUCT    sd_SysOpName,18
  117.     WORD    sd_MaxSlots
  118.     WORD    sd_MaxObservers
  119.     LABEL    ServerData_SIZEOF
  120.  
  121.     STRUCTURE TempBomb,0
  122.     STRUCT    bmb_Node,MLN_SIZE
  123.     WORD    bmb_BlockX
  124.     WORD    bmb_BlockY
  125.     WORD    bmb_PixelX
  126.     WORD    bmb_PixelY
  127.     WORD    bmb_Fuse        ; >0 bomb is still ticking; =0 bomb is going to explode
  128.     LONG    bmb_Range
  129.     WORD    bmb_Direction        ; in case of kick/remote bomb holds the direction
  130.     WORD    bmb_OriginX        ; holds the x/y pos (block) where the bomb was placed
  131.     WORD    bmb_OriginY        ; useful to find kick/remotebombs
  132.     WORD    bmb_Type        ; is set to one of BOMB_#?
  133.     LABEL    TempBomb_SIZEOF
  134.  
  135.     STRUCTURE Player,0
  136.     WORD    plr_Player        ; player num
  137.     LONG    plr_Status        ; this is set to one of PA_#?
  138.     WORD    plr_Dead        ; >0 = player is alive
  139.     WORD    plr_PixelX        ; xpos + border (24 pixel)
  140.     WORD    plr_PixelY        ; ypos + border (16 pixel)
  141.     WORD    plr_BlockX        ; xpos (block number)
  142.     WORD    plr_BlockY        ; ypos (block number)
  143.  
  144.     WORD    plr_BombCount        ; how many bombs this player has currently ticking
  145.     WORD    plr_MxKickBombs        ; how many kickbombs this player has
  146.  
  147.     APTR    plr_BombListHeader    ; -> MLH doubly linked list of bombs belonging to this player
  148.     APTR    plr_RemoteBomb        ; -> Bomb Node
  149.     APTR    plr_KickBomb        ; -> Bomb Node
  150.  
  151.     WORD    plr_MaxRange        ; flamele of player ranging from 2-15
  152.     WORD    plr_MaxBombs        ; how many bombs this player can drop
  153.     WORD    plr_FuseLength        ; fuselength of bombs the player can drop
  154.     WORD    plr_Speed        ; player speed; SPEED_NORMAL=4, SPEED_SLOW=3, SPEED_FAST=6
  155.     WORD    plr_SpeedC        ; >0 = player has other speed (SPEED_SLOW, SPEED_FAST)
  156.  
  157.     WORD    plr_SwapHoriz        ; >0 = swaped horizontal controls
  158.     WORD    plr_SwapVert
  159.     WORD    plr_NoDrop        ; >0 = player can't drop bombs
  160.  
  161.     WORD    plr_ShieldCount        ; >0 = player has shield
  162.     WORD    plr_StandStillCount    ; >0 = player can't move
  163.     WORD    plr_InvisibleCount    ; >0 = player is invisible
  164.     WORD    plr_AfrerBurnerCount    ; >0 = player has afterburner
  165.     WORD    plr_b2bc
  166.  
  167.     WORD    plr_FlameThrowerCount    ; >0 = player has lightsaber
  168.     WORD    plr_FlameThrowerDir
  169.     WORD    plr_FlameThrowerRange    ; 0-4
  170.  
  171.     WORD    plr_MagnetCount
  172.     WORD    plr_MagnetDir
  173.  
  174.     STRUCT    plr_Name,34
  175.     STRUCT    plr_System,64
  176.     LABEL    Player_SIZEOF
  177.  
  178.     STRUCTURE dynSemaphore,0
  179.     STRUCT    ds_Semaphore,SS_SIZE    ; embedded signalsemaphore
  180.     LONG    ds_OpenCnt
  181.     LONG    ds_Quit            ; dynamite will set this to 1 if it wants to quit
  182.     LONG    ds_GameRunning        ; is set to one of GAME_#?
  183.     LONG    ds_Frames
  184.     LONG    ds_Walk            ; set to one of DIR_ to make the player move or stop
  185.     LONG    ds_Drop            ; set to 1 to drop a bomb
  186.     LONG    ds_DropKick        ; set to 1 to drop a kickbomb
  187.     LONG    ds_PlayerNum        ; 0-15
  188.     APTR    ds_Players        ; array to players (0-15)
  189.     LONG    ds_MapWidth        ; holds the width of the map in blocks
  190.     LONG    ds_MapHeight        ; holds the height of the map in blocks
  191.     APTR    ds_Grid            ; array ptr to the actual map (29 entries max). each entry contains 1 line of the map without powerups
  192.     APTR    ds_BonusGrid
  193.     APTR    ds_AddBubble        ; setting this pointer to a string will make dynamite show the string given here as bubble. dynamite
  194.                     ; will reset this pointer to 0 after succesfull creation of the bubble
  195.     APTR    ds_ServerData        ; see serverdata for details
  196.     APTR    ds_ExplosionGrid    ; array ptr to the explosion map (29 entries max). each entry contains 1 line of the explosion map
  197.                     ; this map reflects where currently explosions are (explosion=1)
  198.                     ; each element of line is CHAR sized
  199.     LONG    ds_Version        ; holds the version of dynamite (e.g. 45)
  200.  
  201.     APTR    ds_BotInfo        ; pointer to an array of 255 (so 255 bots max are
  202.                     ; supported with this array) long pointers to hold a
  203.                     ; string (versioninfo, description) of your bot.
  204.                     ; You should set the entry for your bot after
  205.                     ; opencnt has been increased by your bot and set it
  206.                     ; back to NULL if your bot is about to decrease the
  207.                     ; opencnt again on quit.
  208.  
  209.                     ; entry for your bot in this array is opencnt after
  210.                     ; increasing (on botstartup, see example)
  211.     LABEL    dynSemaphore_SIZEOF
  212.  
  213.     ENDC    ; DYNAMITE_I